package com.baozun.houji.adapter

import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentActivity
import androidx.viewpager2.adapter.FragmentStateAdapter

/**
 * @Title：导航adapter
 * @Description：
 * @Author：xuefeng.zhu
 * @Since：2022/10/19
 * @Version：1.0.0
 */
class MainNavigateAdapter(activity: FragmentActivity, val fragment: MutableList<Fragment>) : FragmentStateAdapter(activity) {

    override fun getItemCount(): Int {
        return fragment.size
    }

    override fun createFragment(position: Int): Fragment {
        return fragment[position]
    }
}